<!DOCTYPE html>
<html>
<head>
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/jsp/head.jsp"%>
<link rel="stylesheet" href="${pageContext.request.contextPath}/static/js/lib/bootstrap/css/bootstrap-tree.css">
<script src="${pageContext.request.contextPath}/static/js/lib/bootstrap/js/bootstrap-tree.js"></script>
<script type="text/javascript">

$(function () {
	var data = [];
	data.push({ id: 1, pid: 0, text: '1' });
	data.push({ id: 2, pid: 1, text: '1.1' });
	data.push({ id: 4, pid: 2, text: '1.1.2' });
	data.push({ id: 5, pid: 2, text: '1.1.2' });      
	
	data.push({ id: 10, pid: 8, text: 'wefwfwfe' });
	data.push({ id: 11, pid: 8, text: 'wgegwgwg' });
	data.push({ id: 12, pid: 8, text: 'gwegwg' });
	
	data.push({ id: 6, pid: 2, text: '1.1.3', ischecked: true });
	data.push({ id: 7, pid: 2, text: '1.1.4' });
	data.push({ id: 8, pid: 7, text: '1.1.5' });
	data.push({ id: 9, pid: 7, text: '1.1.6' });
	
	var treeData = [
	 { "text": "长安汽车","icon":"${pageContext.request.contextPath}/static/js/lib/bootstrap/img/ok.gif", "data":{"id":"10000","code":"CA"}, "children": [
	     { "text": "华北大区", "data":{"id":"11000","code":"N"} },
	     { "text": "华南大区", "data":{"id":"12000","code":"S"},"children": [
             { "text": "广东", "data":{"id":"12100","code":"GD"} },
             { "text": "广西", "data":{"id":"12200","code":"GX"} },
	     ]
	     },
	     
	     { "text": "西南大区", "data":{"id":"13000","code":"SE"}, "children": [
	             { "text": "重庆", "data":{"id":"13100","code":"CQ"} ,"children": [
						{ "text": "重庆安福", "data":{"id":"13110","code":"CQAF"} },
						{ "text": "重庆万友", "data":{"id":"13120","code":"CQWY"} }]
					},
	             { "text": "四川", "data":{"id":"13200","code":"SC"} }
	     ]
	     },
	     { "text": "西北大区", "data":{"id":"14000","code":"NE"} }
	     
	     ]
	 },
	 { "text": "福田汽车", "data":{"id":"20000","code":"FT"} },
	 { "text": "上海大众", "data":{"id":"30000","code":"DZ"} },
	 { "text": "广汽本田", "data":{"id":"40000","code":"BT"} }
	]

    $('#simpleTree').BootstrapTree({
    	expand: true,
		data: treeData,		
		onNodeClick: function(data,node){
			alert(JSON.stringify(data));
		},

		
	});	
	
});

</script>
</head>

<body>
<div class="row-fluid">
  
    <div id="simpleTree"></div>
    

<!--  
    <div id="sidebar" class="nav-collapse" style="cursor:pointer">
        <ul>
            <li><div class="tree-expand"></div>菜单1
                <ul id="rule" class="nav-collapse">
                    <li><div class="tree-expand"></div>Adobe Reader
                        <ul id="rule" class="nav-collapse">
                            <li class="tree-leaf">v1.2.0</li>
                            <li class="tree-leaf">v1.2.1</li>
                        </ul>
                    </li>
                    <li class="tree-leaf">Foxit Reader</li>
                    <li class="tree-leaf">操作员计算机IE设置</li>
                    <li class="tree-leaf">电子签章办理须知</li>
                </ul>
            </li>
            <li><div class="tree-shrink"></div>菜单2</li>
            <li class="tree-leaf">菜单3</li>
        </ul>
    </div>
<!--     
    <div id="main-content" style="margin-left: 215px;">
        <div class="container-fluid">
            <div class="row-fluid">
                <div class="span12">11111</div>
            </div>
        </div>
    </div>
    -->
</div>


</body>

</html>